var express = require('express');
var router = express.Router(); 
var sql = require('./../sql/index');
var Cart = require('./../sql/cart');
var xlsx = require('node-xlsx');
var uuid = require('node-uuid');

// var utils = require('./../utils');
var Pro = require('./../sql/pro');
var Banner=require('./../sql/banner')

router.get('/', (req, res, next) => {
    let { type } = req.query
    type = type||'home'
    sql.find(Banner, { type }, { _id: 0 }).then(data => {
        res.send({
            code: '200',
            mess: '成功获取轮播图',
            data:data
    })
})
})
module.exports=router